package uk.ac.bath.machines.bool;



import java.io.StringWriter;
import uk.ac.bath.legacy.Value;


public class X extends ConstantOperator implements Parametered  {


    double val;
    

    public X() {
	this.val=0;
    }

    public X(double val) {
	this.val=val;
    }

    public void eval(Value result) {
	result.set(val);
    }

    @Override
    public int getParamSize() {
        return 1;
    }

    public void setParamAt(Value v,int i) {
	this.val=v.val;
    }
    

    public int getStateSize() {
        return 1;
    }

//     public int nIn() {
// 	return 0;
//     }
//     public int nOut() {
// 	return 1;
//     }

    public Object clone() {
        return new X(val);
    }
 
    public void toString(StringWriter w) {
        w.write("X ");
    }

}

